package com.wuliupai.delivery.wuliupaidelivery.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.wuliupai.delivery.wuliupaidelivery.constants.Value;

/**
 * Descriptions：历史记录的OpenHelper
 * <p>
 * Author：ChenME
 * Date：2017/1/4
 * Email：ibelieve1210@163.com
 */
public class CityHistoryDBOpenHelper extends SQLiteOpenHelper {

    private static final int DBVersion = 1;

    public CityHistoryDBOpenHelper(Context context) {
        super(context, Value.DBName_CityHistory, null, DBVersion);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String createTableSql = "create table city_history ( areaCode varchar PRIMARY KEY NOT NULL, " +
                "cityCode varchar, " +
                "provinceCode varchar, " +
                "area varchar, " +
                "city varchar, " +
                "province varchar, " +
                "time integer )";
        db.execSQL(createTableSql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}